<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="commons/meta.jsp"%>
<%@ include file="commons/tags.jsp"%>
<title>添加智汇</title>

<link href="${ctx}/css/form.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/ckeditor/ckeditor.js"></script>
<script src="js/ckeditor/sample.js" type="text/javascript"></script>
<link href="${ctx}/css/ckeditor/sample.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
		//<![CDATA[
	var editor, html = '';
	
	function createEditor()
	{
		if (editor)
			return;
			
		// Create a new editor inside the <div id="editor">, setting its value to html
		var config = {};
		editor = CKEDITOR.appendTo( 'editor', config, html );
	}
	//]]>
		</script>
</head>
<!-- onload="createEditor()" -->
<body>
	<div id="container">
		<div id="middlecontent">
			<form action="${ctx}/zhihui/updateZhihui" method="post">
				<div id="divform">
					<input type="hidden" name="zhihuiId" value="${zhihui.zhihuiId}"/>
					<div class="fielddiv">
						<label> 文章标题: </label> <input type="text" name="title"
							class="input" value="${zhihui.title }"/>
					</div>
					<div class="fielddiv">
						<label> 文章简介: </label> <textarea cols="50" rows="5" name="jianjie" class="input">${zhihui.jianjie}</textarea>
					</div>
					
					<div class="fielddiv">
						<label> 权重: </label> <select class="input" name="weight">
							
							<c:forEach items="1,2,3,4" var="num">
								<c:choose>
									<c:when test="${num==zhihui.weight }">
										<option value="${num }" selected="selected">${num }</option>
									</c:when>
									<c:otherwise>
										<option value="${num }">${num }</option>
									</c:otherwise>
								</c:choose>
								
								
							</c:forEach>

						</select>

					</div>

					<div class="fielddiv">
						<label> 栏目: </label>
						<select name="flanmu" class="input">
							<c:forEach items="${applicationScope.firstLanmu}" var="flanmu">
								<c:choose>
									<c:when test="${flanmu.id==flid }">
										<option value="${flanmu.id}" selected="selected">${flanmu.name}</option>
									</c:when>
									<c:otherwise>
										<option value="${flanmu.id}">
											${flanmu.name}
										</option>
									</c:otherwise>
								</c:choose>
								
							</c:forEach>
						</select>
						<br/>
						<br/><label> 二级栏目: </label>
						<table class="input">
							<tr>
								<c:forEach items="${lmzy}" var="slanmu">
									<td>
										
										<c:choose>
											
												<c:when test="${slanmu.seleted }">
													<input type="checkbox" name="lanmu" value="${slanmu.id }" checked="checked"/>&nbsp;${slanmu.name }
												</c:when>
												<c:otherwise>
													<input type="checkbox" name="lanmu" value="${slanmu.id }"/>&nbsp;${slanmu.name }
												</c:otherwise>
											</c:choose>
										
									</td>
								</c:forEach>
							</tr>
						</table>
					</div>
					<div class="fielddiv">
						<label> 文章内容: </label> <textarea cols="50" rows="5" name="content" class="input">${zhihui.content}</textarea>
					</div>
		
				<div class="center">
					<input type="submit" value="提交" class="buttom" /> <input
						type="reset" value="清空" class="buttom" />
				</div>

			</form>
		</div>
	</div>
</body>
</html>